<!-- 类似于vue中的:style="{}"语法 -->
<button [ngStyle]="{ color: 'green' }">按钮</button>
<button [ngStyle]="{ color: blue }" (click)="btnClick()">按钮</button>
<button [ngStyle]="getStyles()">按钮</button>
<hr />
<!-- 类似于vue的:class="{}"绑定不支持数组内嵌套对象写法 -->
<button [ngClass]="'btn'">按钮</button>
<button [ngClass]="'btn success'">按钮</button>
<button [ngClass]="{ danger: true }" class="btn">按钮</button>
<button [ngClass]="{ 'btn success': true }">按钮</button>
<button [ngClass]="['btn','danger']">按钮</button>

